pub const QORD: [[usize; 5]; 4] = [
    [1, 1, 0, 0, 1],
    [0, 1, 1, 0, 0],
    [0, 0, 0, 1, 1],
    [1, 0, 1, 1, 0],
];

#[rustfmt::skip]
pub const QBOX: [[[u8; 16]; 4]; 2] = [
    [
        [
            0x8, 0x1, 0x7, 0xD, 0x6, 0xF, 0x3, 0x2,
            0x0, 0xB, 0x5, 0x9, 0xE, 0xC, 0xA, 0x4,
        ], [
            0xE, 0xC, 0xB, 0x8, 0x1, 0x2, 0x3, 0x5,
            0xF, 0x4, 0xA, 0x6, 0x7, 0x0, 0x9, 0xD,
        ], [
            0xB, 0xA, 0x5, 0xE, 0x6, 0xD, 0x9, 0x0,
            0xC, 0x8, 0xF, 0x3, 0x2, 0x4, 0x7, 0x1,
        ], [
            0xD, 0x7, 0xF, 0x4, 0x1, 0x2, 0x6, 0xE,
            0x9, 0xB, 0x3, 0x0, 0x8, 0x5, 0xC, 0xA,
        ],
    ], [
        [
            0x2, 0x8, 0xB, 0xD, 0xF, 0x7, 0x6, 0xE,
            0x3, 0x1, 0x9, 0x4, 0x0, 0xA, 0xC, 0x5,
        ], [
            0x1, 0xE, 0x2, 0xB, 0x4, 0xC, 0x3, 0x7,
            0x6, 0xD, 0xA, 0x5, 0xF, 0x9, 0x0, 0x8,
        ], [
            0x4, 0xC, 0x7, 0x5, 0x1, 0x6, 0x9, 0xA,
            0x0, 0xE, 0xD, 0x8, 0x2, 0xB, 0x3, 0xF,
        ], [
            0xB, 0x9, 0x5, 0x1, 0xC, 0x3, 0xD, 0xE,
            0x6, 0x4, 0x7, 0xF, 0x2, 0x0, 0x8, 0xA,
        ],
    ]
];

pub const RS: [[u8; 8]; 4] = [
    [0x01, 0xa4, 0x55, 0x87, 0x5a, 0x58, 0xdb, 0x9e],
    [0xa4, 0x56, 0x82, 0xf3, 0x1e, 0xc6, 0x68, 0xe5],
    [0x02, 0xa1, 0xfc, 0xc1, 0x47, 0xae, 0x3d, 0x19],
    [0xa4, 0x55, 0x87, 0x5a, 0x58, 0xdb, 0x9e, 0x03],
];

// 0x169 (x⁸ + x⁶ + x⁵ + x³ + 1)
pub const MDS_POLY: u8 = 0x69;
// 0x14d (x⁸ + x⁶ + x³ + x² + 1)
pub const RS_POLY: u8 = 0x4d;
